//
//  KLCollectionGoodTableViewCell.m
//  KunLun
//
//  Created by Mac on 2017/11/28.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "KLCollectionShopTableViewCell.h"
@interface KLCollectionShopTableViewCell()
@property(nonatomic, strong) UIImageView                     *iconImageView;
@property(nonatomic, strong) STLabel                     *titleLable;
@property(nonatomic, strong) STLabel                     *desLable;
@property(nonatomic, strong) STLabel                     *addLable;


@end
@implementation KLCollectionShopTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 150;
}
#pragma mark --subView
- (void)configSubView{
    
    self.chosedButton = [[STButton alloc] initWithFrame:CGRectMake(10, 0, 44, 44)
                                                  title:nil
                                             titleColor:nil
                                              titleFont:0
                                           cornerRadius:0
                                        backgroundColor:nil
                                        backgroundImage:nil
                                                  image:[UIImage imageNamed:@"购物未选中"]];
    
    [self.chosedButton setImage:[UIImage imageNamed:@"购物选中"] forState:UIControlStateSelected];
    self.chosedButton.centerY = [KLCollectionShopTableViewCell cellHeight]/2;
    [self addSubview:self.chosedButton];
    
    
    self.iconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.chosedButton.right , 10, 80, 100)];
    self.iconImageView.image = [UIImage imageNamed:@"09"];
    [self addSubview:self.iconImageView];
    
    self.titleLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconImageView.right + 5, self.iconImageView.top + 3, UIScreenWidth - 20 - self.iconImageView.right, 20)
                                                text:@"das住宿"
                                           textColor:KL_firstTextColor
                                                font:14
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.titleLable];
    
    self.desLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconImageView.right + 5, self.titleLable.bottom + 3, UIScreenWidth - 20 - self.iconImageView.right, 40)
                                                text:@"房价开始砥砺奋进克鲁塞德九分裤的手机蓝色的见风使舵"
                                           textColor:KL_secendTextColor
                                                font:14
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentLeft];
    self.desLable.numberOfLines = 0;
    [self addSubview:self.desLable];
    
    self.addLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconImageView.right + 5, self.desLable.bottom + 3, UIScreenWidth - 20 - self.iconImageView.right, 20)
                                              text:@"四川省成都市金牛区榕树路13号"
                                         textColor:KL_firstTextColor
                                              font:12
                                       isSizetoFit:NO
                                     textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.addLable];
    

    
    self.goButton = [[STButton alloc] initWithFrame:CGRectMake(0, 0, 80, 30)
                                               title:@"进入店铺"
                                          titleColor:[UIColor whiteColor]
                                           titleFont:13
                                        cornerRadius:5
                                     backgroundColor:KL_BlueBackGroundColor
                                     backgroundImage:nil
                                               image:nil];
    self.goButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    self.goButton.right = UIScreenWidth - 10;
    self.goButton.top = self.addLable.bottom + 3;
    [self addSubview:self.goButton];
    
}

@end

